Skip to content

Add C# SDK to nix dev shell#1559

Open
chavic wants to merge 1 commit into
payjoin:masterfrom
chavic:chavic/csharp-nix-devshell
Open

Add C# SDK to nix dev shell#1559
chavic wants to merge 1 commit into
payjoin:masterfrom
chavic:chavic/csharp-nix-devshell

Conversation

@chavic
Copy link
Copy Markdown
Collaborator

@chavic chavic commented May 15, 2026

Agents and contributors using nix could not run the C# binding tests because dotnet was not provided by the dev shell. The C# test script generates bindings and then runs dotnet test, so nix should provide the SDK used by the repo.

  • add the .NET 8 SDK to the default nix development shell
  • document the nix command for running the C# binding test script

Closes #1555

Validation

  • nix --extra-experimental-features "nix-command flakes" fmt -- --ci
  • nix --extra-experimental-features "nix-command flakes" develop -c bash payjoin-ffi/csharp/contrib/test.sh

Disclosure: co-authored by Codex

@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented May 15, 2026

Coverage Report for CI Build 25996995172

Coverage remained the same at 85.297%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 13671
Covered Lines: 11661
Line Coverage: 85.3%
Coverage Strength: 395.78 hits per line

💛 - Coveralls

Copy link
Copy Markdown
Collaborator

@spacebear21 spacebear21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

concept ACK but @nothingmuch brought up out of band that dotnet-sdk_8 is considered insecure and furthermore we should set DOTNET_CLI_TELEMETRY_OPTOUT in the devshell in dotnet-sdk_10

@chavic
Copy link
Copy Markdown
Collaborator Author

chavic commented May 15, 2026

concept ACK but @nothingmuch brought up out of band that dotnet-sdk_8 is considered insecure and furthermore we should set DOTNET_CLI_TELEMETRY_OPTOUT in the devshell in dotnet-sdk_10

I see, considering making dotnet-sdk_10 the default, the case for dotnet-sdk_8 was compatibility, hopefully 8 has faded out

Provide .NET 10 SDK tooling in the default nix development shell while keeping the .NET 8 runtime available for the current net8.0 C# tests.

Opt out of dotnet CLI telemetry and document the nix command that generates bindings and runs the C# test suite.
@chavic chavic force-pushed the chavic/csharp-nix-devshell branch from 5ac6355 to 6489349 Compare May 17, 2026 16:55
Copy link
Copy Markdown
Collaborator Author

chavic commented May 17, 2026

Updated this to use SDK 10 tooling while preserving the current net8.0 runtime compatibility. The dev shell now combines dotnetCorePackages.sdk_10_0 with dotnetCorePackages.runtime_8_0, sets DOTNET_CLI_TELEMETRY_OPTOUT=1, and updates global.json to select SDK 10.

I kept the project target on net8.0 so this does not raise the runtime compatibility floor.

@chavic
Copy link
Copy Markdown
Collaborator Author

chavic commented May 17, 2026

After some diggin into this a bit more.

BTCPay’s .NET 10 floor appears to be BTCPay Server 2.3.7: their 2.3.7 release notes say it is the first release using .NET 10, and their migration guide tells plugin authors moving to net10.0 to bump the minimum BTCPay Server requirement to >=2.3.7.

So I'm opting to have net 10 but still have net 8 compatibility

@chavic chavic requested a review from spacebear21 May 17, 2026 17:41
@chavic chavic marked this pull request as ready for review May 17, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support C# build & test in nix

3 participants